﻿using CarAppDomain.Sys.Entities;
using CarAppDto.Sys.AdminDtos;
using D.UtilCore.Dtos;
using D.UtilSqlsugarOrm;

namespace CarAppService.Sys.IServices
{
    /// <summary>
    /// 系统管理员参数接口
    /// </summary>
    public interface IAdminService : IBaseService<SysAdminEntity>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="reqAddAdmin"></param>
        /// <returns></returns>
        Task<ApiResult<int>> AddAdminAsync(ReqAddAdmin reqAddAdmin);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<ApiResult<int>> DeleteAdminAsync(List<string> ids);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="reqUpdateAdmin"></param>
        /// <returns></returns>
        Task<ApiResult<int>> UpdateAdminAsync(ReqUpdateAdmin reqUpdateAdmin);

        /// <summary>
        /// 单个查询
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResult<RepAdminInfo>> GetAdminAsync(string id);

        /// <summary>
        /// 查询列表
        /// </summary>
        /// <param name="reqGueryAdminList"></param>
        /// <returns></returns>
        Task<ApiResult<List<RepAdminInfo>>> QueryAdminListAsync(ReqGueryAdminList reqGueryAdminList);

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="reqQueryAdminPage"></param>
        /// <returns></returns>
        Task<ApiResult<PageModel<RepAdminInfo>>> QueryAdminPagesAsync(ReqQueryAdminPage reqQueryAdminPage);

        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="account"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        Task<ApiResult<string>> LoginAsync(string account, string pwd);

        /// <summary>
        /// 刷新token
        /// </summary>
        /// <param name="account"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        Task<ApiResult<string>> RefreshTokenAsync(string token);
    }
}
